package com.zhiwen.design.singleton;

/**
 * @Auther: wuzhiwen
 * @Date: 2018/11/30 10:34
 * @Description: 懒汉式（延迟加载方式） 优化一
 */
public class Singleton03 {
    private Singleton03(){}

    private static Singleton03 Singleton03 = null;

    public static Singleton03 getSingleton03(){
        synchronized (Singleton03.getClass()) {
            if (Singleton03 == null) {
                return new Singleton03();
            }
        }
        return Singleton03;
    }
}
